package Persistencia;
import org.hibernate.*;
import Dominio.*;
public class PruebaHibernate {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		HibernateUtil hibernateUtil = new HibernateUtil();
	    Session session = hibernateUtil.getSession();

        Cliente c = new Cliente();
        c.setDni(12345678);
        c.setNombre("Pepe");
        c.setApellidos("Garcia Lopez");
        c.setDomicilio("C/EL agua");
        c.setEmail("pepe@hotmail.com");
        c.setEsSocio(1);

	    session.save(c);
	    session.flush();
	    session.close();
	    //hibernateUtil.checkData("select * from Cliente");
        
     // Create new User and store them the database	
	}

}
